<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>线下支付</title>
<link  rel="stylesheet" type="text/css"  href="/css/user/buy/css.css"/>
<link rel="stylesheet" type="text/css"  href="/css/user/users/member_center.css" />
<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src = "/js/dialog.min.js"></script>
<script type="text/javascript" src = "/js/bstdialog.min.js"></script>
<script type="text/javascript" src="/js/baguetteBox.js"></script>
<script type="text/javascript" src="/js/member-center.js"></script>
<script type="text/javascript" src="/js/user/users/member_center/menu_line.js"></script>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/ajaxDataFormat.js"></script>
<!-- <script src="/js/pic_uploader.js"></script>
<script type="text/javascript" src="/js/jquery.imagePreview.1.0.js"></script> -->
<script src="/js/ajaxfileupload.js"></script>
<script src="/js/user/users/finance/payment/payment.js"></script>
    
</head>
<body>
<div class="Wrapper">
		<!--财务管理头部-->
		<jsp:include page="../../../common/member/memberHeader.jsp"></jsp:include>
		<!--财务管理头部-->
		<!--财务管理中间部分-->
		<div class="uc_bd mt20 mb20 ">
			<div class="uc_layer">
				<div class="account">
					<!--财务管理左侧-->
					<jsp:include page="../../../common/finance/finance_left.jsp"></jsp:include>
					<!--财务管理左侧-->
					<!--基本资料右侧-->
					<div class="member_r fr">
						<div class="uitopb uitopb_border">
							<div class="lm-t tabs">财务管理>线下支付</div>
							<div class="uc_content order">
							<!-- 此处是内容！三个选项卡  其中汇款信息 是不可修改的，汇款凭证  需要填写 以及上传图片，汇款核对 客户不可修改，本公司可修改 -->
							<div class="title_bar xTabsMain">
								<a href="javascript:void(0)" id="return_remit" style="display:none;">返回汇款信息</a>
								<ul class="tabs xTabs-Nav" id="myTab" style="width: 740px">
									<li class="sta active">
										<a href="javascript:void(0)" style="margin: 0" class="remit_title">汇款信息</a>
									</li>
									<li class="sta">
										<a href="javascript:void(0)" style="margin: 0" class="remit_title">汇款凭证</a>
									</li>
 									<!--<li class="sta">
										<a href="javascript:void(0)" style="margin: 0">汇款核对</a>
									</li> -->
								</ul>
								<div class="xTabs-Box">
					                <div class="xTabBox-Item" style="display: block;">
						                <table id="remittance_infor" width="760px;" cellspacing="0" cellpadding="0" class="remittance_infor">
						                		<tbody>
							                		<tr>
							                			<th>编号</th>
							                			<th>交易类型</th>
							                			<th>汇款单位</th>
							                			<th>汇款银行</th>
							                			<th>汇款金额 </th>
							                			<th>到款时间</th>
							                			<th>状态</th>
							                			<th colspan="2">操作 </th>
							                		</tr>
							                		<c:if test="${pList.size() == 0}">
														<tr><td colspan="12">未查询到相关数据！</td></tr>
													</c:if>
													<c:if test="${pList.size() != 0}">
								                		<c:forEach items="${pList}" var="pl" varStatus="status">
									                		<tr>
									                			<td class="orderid" data-orderid = "">${pl.paymentNum}</td>
									                			<td>
										                			<c:if test="${pl.dealType == 1}">充值</c:if>
										                			<c:if test="${pl.dealType == 2}">消费</c:if>
									                			</td>
									                			<td>${pl.remitCompany}</td>
									                			<td class="bankname">${pl.remitBank}</td>
									                			<td><fmt:formatNumber value="${pl.remitMoney}" pattern="#0.00"/></td>
									                			<td class="time"><fmt:formatDate value="${pl.remitTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
									                			<td class="status">
									                				<c:if test="${pl.isCancel == 0 || pl.isCancel == null }">
										                				<c:if test="${pl.paymentState == 0}">未上传</c:if>
											                			<c:if test="${pl.paymentState == 1}">已上传</c:if>
											                			<c:if test="${pl.paymentState == 2}">审核通过</c:if>
											                			<c:if test="${pl.paymentState == 3}">审核退回</c:if>
											                		</c:if>
											                		<c:if test="${pl.isCancel == 1 }">已取消</c:if>
									                			</td>
									                			<td>
									                				<c:if test="${pl.isCancel == 0 || pl.isCancel == null }"> 
									                				<a href="javascript:void(0)" class="operate_voucher" data-pmid="${pl.paymentId}" data-pmst="${pl.paymentState}">
									                					<c:if test="${pl.paymentState == 0}">上传凭证</c:if>
										                				<c:if test="${pl.paymentState == 1 || pl.paymentState == 3}">修改凭证</c:if>
										                				<c:if test="${pl.paymentState == 2}">查看凭证</c:if>
										                			</a>
									                				|</c:if>
									                			<a href="javascript:void(0)" class="view_detail" data-detailid="${pl.paymentId}">详情</a>
									                			</td>
									                		</tr>
								                		</c:forEach>
							                		</c:if>
						                		</tbody>
						                	</table>
						                	<div class="remit_box" style="display:none;">
							                	<table class="gridTable">
													<tbody>
														<tr>
															<td width="20%" class="taright">编号：</td>
															<td width="30%"><span id="DpaymentNum"></span></td>
															<td width="20%" class="taright">订单编号：</td>
															<td><span id="DorderNum"></span></td>
														</tr>
														<tr class="alt">
															<td width="20%" class="taright">类型：</td>
															<td width="30%"><span id="DdealType"></span>
															</td>
															<td width="20%" class="taright">金额(元)：</td>
															<td><span id="DremitMoney"></span></td>
														</tr>
														<tr>
															<td width="20%" class="taright">汇款单位：</td>
															<td width="30%"><span id="DremitCompany"></span>
															</td>
															<td width="20%" class="taright">汇款银行：</td>
															<td><span id="DremitBank"></span></td>
														</tr>
														<tr>
															<td width="20%" class="taright">联系人：</td>
															<td width="30%"><span id="DlinkMan"></span>
															</td>
															<td width="20%" class="taright">联系电话：</td>
															<td><span id="DlinkTell"></span></td>
														</tr>
													</tbody>
												</table>
				                			</div>
					                </div>
					                <div class="xTabBox-Item" style="display: none;">
					                	<ul class="remittance_form">
					                		<li>订单编号：<span>
					                			<input type="text" name="orderNum" id="orderNumber" class="input_txt" readonly="readonly"/>
					                			<input type="hidden" name="paymentId" id="paymentId" >
					                		</span></li>
					                		<li>汇款时间：<span><input name="remitTime" type="text" id="remitTime" class="inputtext date Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></span></li>
					                		<li>汇款银行：<span><input type="text" name="remitBank" id="remitBank" class="input_txt"/></span></li>
					                		<li id = "fileuploader">汇款凭证上传：
					                			<input type="file" name="advImage" id="advImage" class="advImage"/>
												<input type="hidden" name="attachPath" id="attachPath" value="${path}" />
												<input type="hidden" name="attachId" id="attachId" value="${attachId}"> 	
											</li>
											<li id="showImg"></li>
					                		<li class="submit_remittance">
					                			<input type="button" name="button" id="updatePayment" value="提交" class="basicbtn" style="margin-left: -20px;width: 80px;">
					                		</li>
					                	</ul>
					                </div>
					                
					                
					             </div>
							</div>
						
							</div>
						</div>
					</div>
					
					<!--财务管理右侧-->
					<div class="cl"></div>
				</div>
			</div>
		</div>
		<!--财务管理中间部分-->
		<!---------------------------------footer------------------------------------>
		<jsp:include page="../../../common/footer.jsp" />
		<!---------------------------------footer结束------------------------------------>
	</div>
</body>
</html>